<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    // es5声明字符串类型的数据
    // const str = "字符串";
	// const str1 = '字符串1';
	// console.log(str,str1)

    // es6增加了一种写法
    // const str2 = `字符串2`;
	// console.log(str2);

    // es5
    // let str = "我的名字";
	// let str1 = "zhangsan";
	// let age = 18;
	// let newStr = str+"叫"+str1+",今年"+age+"岁了";
	// console.log(newStr);


    // es6:通过反引号声明的字符串可以换行可以拼接
    function fn(){
		return 100;
    }
	let str = "我的名字";
	let str1 = "zhangsan";
	let age = 18;
	const newStr = `${str}'叫'${str1},"今年"${age+fn()}岁了,`;
	console.log(newStr);

</script>
</html>